
<div class="layuimini-container">
    <form id="app-form" class="layui-form layuimini-form">
    <div class="layui-form-item">
        <label class="layui-form-label">分类名</label>
        <div class="layui-input-block">
            <input type="text" name="name" lay-verify="required" lay-reqtext="分类名不能为空" value="" class="layui-input field-name">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">作者</label>
        <div class="layui-input-block">
            <input type="text" name="admin_id" lay-verify="required" lay-reqtext="作者不能为空" value="" class="layui-input field-admin_id">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">资讯内容</label>
        <div class="layui-input-block">
            <input type="text" name="intro" lay-verify="required" lay-reqtext="资讯内容不能为空" value="" class="layui-input field-intro">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">状态：</label>
        <div class="layui-input-block">
            <input type="radio" name="status" value="1"  title="启用" class="field-status" checked>
            <input type="radio" name="status" value="0"  title="禁用" class="field-status">
        </div>
    </div>
    
    <input type="hidden" class="field-id" name="id">
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn">确认保存</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
    </form>
</div>

<script>
    

    layui.use(['form','jquery', 'layer', 'func'], function () {
        var form = layui.form,
            layer = layui.layer,
            $ = layui.jquery;

        layui.func.assign({:json_encode($data)});   // 解析数据
    });
</script>
</body>
</html>